﻿<%@ Page  Title="" Language="C#" 
    MasterPageFile="~/Medianamik/MasterPages/MedianamikModalWindow.Master" 
    AutoEventWireup="true" CodeBehind="ImportResourceWindow.aspx.cs" 
    Inherits="Medianamik.UI.Web.ModalWindows.ImportResourceWindow" %>

<asp:Content ID="HeaderContentHolder" runat="server" ContentPlaceHolderID="HeaderContentHolder">
<telerik:RadScriptBlock runat="server" ID="scriptBlock">
	<script type="text/javascript">
        //<![CDATA[
        function GetRadWindow()
        {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }

        function Cancel_Clicked()
        {
            var oWindow = GetRadWindow();
            oWindow.argument = null;
            oWindow.Close();
        }

        function closeWindow(reloadType) {
            var arg = new Object();
            arg.reloadType = reloadType;
            var oWindow = GetRadWindow();
            oWindow.Close(arg);
        }

        function validateRadUpload1(source, arguments) {
            arguments.IsValid = getRadUpload('<%= RadUpload1.ClientID %>').validateExtensions();
        }
        //]]>            
	</script>
	</telerik:RadScriptBlock>
</asp:Content>

<asp:Content ID="CenterContent" ContentPlaceHolderID="CenterContent" runat="server">
    <asp:ScriptManager ID="MedianamikScriptManager" EnableHistory="true" EnablePageMethods="true" runat="server"  EnablePartialRendering="true" ScriptMode="Release" />
	<fieldset>
        <asp:Literal ID="mesageLiteral" runat="server" Visible="false" EnableViewState="false" />
        <asp:CustomValidator
            ID="Customvalidator1" runat="server" OnServerValidate="UploadServerValidate"
            Display="Dynamic" ClientValidationFunction="validateRadUpload1"><p><asp:Literal runat="server" Text="<%$ Resources: Medianamik_ResourceManagement, InvalidResourceFile %>"></asp:Literal></p></asp:CustomValidator>
        <p><asp:Literal ID="textLabel" runat="server" Text="<%$ Resources: Medianamik_ResourceManagement, SelectImportResource %>" /></p>
	    <p><telerik:radupload
                id="RadUpload1"
                runat="server" 
                initialfileinputscount="1" 
                skin = "Vista"
                maxfileinputscount="50"
                InputSize="50" Width="100%"
                ControlObjectsVisibility="All"
                allowedfileextensions=".xml" 
                OverwriteExistingFiles="true"
                TargetFolder="~/Medianamik/TemporaryFiles/" /></p><br /><hr style="width:400px" /><br />
         <p><asp:Button ID="importButton" runat="server" OnClick="Import" Text="<%$ Resources: Medianamik_ResourceManagement, ImportResourceButton %>" class="Btn" />&nbsp;
	        <input type="button" class="Btn" value="<%=Resources("Medianamik_Global", "Cancel") %>" onclick="Cancel_Clicked();" /></p>
	</fieldset>
</asp:Content>